home *** CD-ROM | disk | FTP | other *** search
/ Borland JBuilder 6 / jbuilder6.iso / IBM VisualAge for Java Enterprise v4.0 Retail / ivj40 / setup / IDE.Cab / F77366_VAJavaStatusButtonUI.class (.txt) < prev    next >
Encoding:
Java Class File  |  2000-04-25  |  1.1 KB  |  37 lines

  1. package com.ibm.ivb.jface.vajava;
  2.  
  3. import com.ibm.ivb.jface.plaf.StatusButtonUI;
  4. import java.awt.Graphics;
  5. import java.awt.Insets;
  6. import javax.swing.AbstractButton;
  7. import javax.swing.JComponent;
  8. import javax.swing.plaf.ComponentUI;
  9. import javax.swing.plaf.basic.BasicButtonUI;
  10.  
  11. public class VAJavaStatusButtonUI extends StatusButtonUI {
  12.    private static final String kCBIBMCopyright = "(c) Copyright IBM Corporation 1998";
  13.    protected static VAJavaStatusButtonUI buttonUI;
  14.  
  15.    public static ComponentUI createUI(JComponent var0) {
  16.       if (buttonUI == null) {
  17.          buttonUI = new VAJavaStatusButtonUI();
  18.       }
  19.  
  20.       return buttonUI;
  21.    }
  22.  
  23.    public void installUI(JComponent var1) {
  24.       AbstractButton var2 = (AbstractButton)var1;
  25.       super.installUI(var1);
  26.       var2.setMargin(new Insets(1, 1, 1, 1));
  27.    }
  28.  
  29.    protected void paintButtonPressed(Graphics var1, AbstractButton var2) {
  30.       ((BasicButtonUI)this).setTextShiftOffset();
  31.    }
  32.  
  33.    public void uninstallUI(JComponent var1) {
  34.       super.uninstallUI(var1);
  35.    }
  36. }
  37.